<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="order.*" %>
<% String contextPath = request.getContextPath(); %>
<% List<Order> list = Order.find_all(); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" href="<%= contextPath %>/css/style.css" type="text/css" />
		<title>注文管理システム</title>
	</head>
	<body>
		<p>
			<a class="button" href="<%= contextPath %>/order/customer_entry.jsp">受注</a>
		</p>
		<p>
			<table border="1" cellspacing="0">
				<caption>受注一覧</caption>
				<tr>
					<td>注文番号</td>
					<td>顧客名</td>
					<td>受注日時</td>
					<td>情報</td>
				</tr>
				<% for (int i=0 ; i<list.size() ; i++) { %>
				<% 	Order order = (Order)list.get(i); %>
				<tr>
					<td><%= order.getNumber() %></td>
					<td><%= order.getCustomer() %></td>
					<td><%= order.getDate() %></td>
					<td>
						<a href="<%= contextPath %>/order/order.jsp?number=<%= order.getNumber() %>">配送状況</a>
					</td>
				</tr>
				<% } %>
			</table>
		</p>
	</body>
</html>